From: Alastair Tse Date: Thu, 4 Jan 2007 16:34:19 +0000 (+0000) Subject: [XEND] Prevent exception if PIF does not have a network. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15422^2~84 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=4b166e2a1717101567cbb9658ced8b64495e1b65;p=xen.git [XEND] Prevent exception if PIF does not have a network. Signed-off-by: Alastair Tse --- diff --git a/tools/python/xen/xend/XendNode.py b/tools/python/xen/xend/XendNode.py index f0037e984a..117ca3d25d 100644 --- a/tools/python/xen/xend/XendNode.py +++ b/tools/python/xen/xend/XendNode.py @@ -103,7 +103,7 @@ class XendNode: saved_pifs = self.state_store.load_state('pif') if saved_pifs: for pif_uuid, pif in saved_pifs.items(): - if pif['network'] in self.networks: + if pif.get('network') in self.networks: network = self.networks[pif['network']] try: self.PIF_create(pif['name'], pif['MTU'], pif['VLAN'],